import instance from '@/utils/myhttp.js'
function apiLogin (data) {
  return instance({
    url: '/app/v1_0/authorizations',
    method: 'post',
    data
  })
}

// 关注作者
function apiFollow (autid) {
  return instance({
    url: '/app/v1_0/user/followings',
    method: 'post',
    data: {
      target: autid
    }
  })
}

// 取消关注作者
function apiUnFollow (autid) {
  return instance({
    url: `/app/v1_0/user/followings/${autid}`,
    method: 'DELETE'
  })
}
export { apiLogin, apiFollow, apiUnFollow }
